package com.smart.manager.pop.entities.body;


import com.smart.common.entities.core.BaseSearch;
import com.smart.manager.pop.entities.assembler.Answer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.List;

/**
 * 等级规则
 *
 * @author Administrator
 * @date 2022/10/31
 */

public class RDisQuestionnaire {


    /**
     * 支付订单搜索条件
     *
     * @author xiaxuqiu
     * @date 2022/10/17
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    @ApiModel("RDisManager1")
    public static class SearchBody extends BaseSearch {

        @ApiModelProperty(value = "分享人")
        private Long shareId;

        @ApiModelProperty(value = "姓名")
        private String name;

        @ApiModelProperty(value = "年龄")
        private Integer age;

        @ApiModelProperty(value = "性别  0 = 男 1 = 女 99 = 保密")
        private Integer sex;

        @ApiModelProperty(value = "手机号")
        private String mobilePhone;

    }


    @Data
    @ApiModel("RDisManager3")
    public static class EditBody2 implements Serializable {

        @ApiModelProperty(value = "问卷内容")
        private List<Answer> substanceList ;


    }
    @Data
    @ApiModel("RDisManager2")
    public static class EditBody implements Serializable {

        @ApiModelProperty(value = "分享人")
        private Long shareId;

        @ApiModelProperty(value = "姓名")
        @NotBlank(message = "姓名 不能为空")
        @Length(max = 20, message = "姓名 长度不能超过20")
        private String name;

        @ApiModelProperty(value = "手机验证码")
        @NotBlank(message = "手机验证码 不能为空")
        @Length(max = 6, message = "手机验证码 长度不正确")
        private String code;


        @ApiModelProperty(value = "年龄")
        @NotNull(message = "年龄 不能为空")
        @Min(value = 0, message = "年龄 不能小于0")
        @Max(value = 100, message = "年龄 不能大于100")
        private Integer age;

        @ApiModelProperty(value = "性别  0 = 男 1 = 女 99 = 保密")
        @NotNull(message = "性别 不能为空")
        @Min(value = 0, message = "性别 不能小于0")
        @Max(value = 100, message = "性别 不能大于100")
        private Integer sex;

        @ApiModelProperty(value = "手机号")
        @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式错误")
        @NotBlank(message = "手机号不能为空")
        private String mobilePhone;

    }

    @Data
    @ApiModel("RDisManager4")
    public static class EditBody3 implements Serializable {

        @ApiModelProperty(value = "手机号")
        @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式错误")
        @NotBlank(message = "手机号不能为空")
        private String mobilePhone;


    }


}
